package com.itheima.domain;
//1-成员属性
// 姓名 String name  年龄 int age 工资 int salary

//2-无参构造


//3-全参构造


//4- getter & setter


//5- toString方法
public class Teacher {
    private String name;
    private int age;
    private int salary;

    //2-无参构造
    public Teacher() {
    }


    //3-全参构造


    public Teacher(String name, int age, int salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    //4- getter & setter


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }



    //5- toString方法

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                '}';
    }
}

